#!/bin/bash
. scripts/search/export-keys
#curl -s -X PUT http://localhost:8080/api/admin/savedsearches/makelinks/all | jq .
diff -u scripts/search/tests/expected/saved-search <(curl -s "http://localhost:8080/api/search?key=$ADMINKEY&sort=name&subtree=psimalihealth&q=*" | jq '.data.items[] | {name,type}')
diff -u scripts/search/tests/expected/saved-search-links <(curl -s http://localhost:8080/api/dataverses/psimalihealth/links?key=$ADMINKEY | jq .data)
